import request from '@/api/request'

/**
 * 获取所有工位列表
 */
export function getAllWorkstations() {
    return request({
        url: '/workstation/list',
        method: 'get'
    })
}

/**
 * 新增或更新工位
 * @param {object} data - 工位对象
 */
export function saveOrUpdateWorkstation(data) {
    return request({
        url: '/workstation/save',
        method: 'post',
        data
    })
}

/**
 * 根据ID删除工位
 * @param {string} id - 工位ID
 */
export function deleteWorkstationById(id) {
    return request({
        url: `/workstation/delete/${id}`,
        method: 'delete'
    })
}
